// 引入Sequelize模块
const { DataTypes } = require('sequelize');
const sequelize = require('../init/sequelize');
const EmployeeAttendance = require('../entity/EmployeeAttendance');

// 定义Employee模型
const Man = sequelize.define('Man', {
    ID: {
        type: DataTypes.INTEGER,
        primaryKey: true,
        autoIncrement: true
    },
    name: {
        type: DataTypes.STRING(50),
        allowNull: true
    },
    sex: {
        type: DataTypes.STRING(10),
        allowNull: true
    },
    age: {
        type: DataTypes.INTEGER,
        allowNull: true
    },
    salary: {
        type: DataTypes.DECIMAL(10, 2),
        allowNull: true
    },
    work: {
        type: DataTypes.STRING(255),
        allowNull: true
    },
    phone: {
        type: DataTypes.STRING(255),
        allowNull: true
    }
}, {
    // 指定表名
    tableName: 'employees',
    // 禁用Sequelize的时间戳功能
    timestamps: false
});
// 导出Employee模型
module.exports = Man;
